package com.iplay.thezen.proxy;

import java.lang.reflect.InvocationHandler;

/**
 * @author dangwu
 * @since 2021/9/4 7:27 下午
 */
public class SubjectDynamicProxy<T> extends DynamicProxy<T>{
    public static <T> T newProxyInstance(Subject subject){
        ClassLoader loader = subject.getClass().getClassLoader();
        Class<?>[] interfaces = subject.getClass().getInterfaces();
        InvocationHandler handler = new GamePlayIH(subject);
        return newProxyInstance(loader,interfaces,handler);
    }
}
